<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!doctype html>
<html lang="en">
<head>
    <link rel="stylesheet" href="${ctx}/statics/libs/layui/css/modules/sign/iconfont.css?v=${v}">
    <link rel="stylesheet" href="${ctx}/statics/css/gateway.css?v=${v}">
    <title>网关管理</title>
</head>
<body>

<section class="repTable">
    <div class="chartswrap">
        <table id="reports"></table>
    </div>
</section>

<section class="gateway">
    <ul></ul>
</section>

<script type="text/html" id="gateway-tpl">
    {{#  layui.each(d, function(index, item){ }}
    <li class="layui-row" value="{{ item.gatewayId }}">
        <div class="layui-col-md3 gateway-list">
            <div>
                <i class="icon iconfont icon-qicaisheshi {{ item.status == 10 ? 'fontGreen' : 'fontGray'}}"></i>
                <span>{{ item.gatewayName }}</span>
                <span class="IP">{{ item.ip }}</span>
            </div>
            <dev class="dev-info">
                <div><i class="layui-icon layui-icon-radio"></i>设备<em class="total">{{item.total}}</em>台</div>
                <div><i class="layui-icon layui-icon-radio"></i>运行<em class="openNum">{{item.running}}</em>台</div>
                <div><i class="layui-icon layui-icon-radio"></i>离线<em class="closeNum">{{item.offline}}</em>台</div>
            </dev>
        </div>
        <div class="layui-col-md9 dev-list hide">
            <div class="layui-row">
                <div class="layui-col-md6">
                    <table id="tbId{{ item.gatewayId }}-l" lay-filter="tbId{{ item.gatewayId }}-l"></table>
                </div>
                <div class="layui-col-md6">
                    <table id="tbId{{ item.gatewayId }}-r" lay-filter="tbId{{ item.gatewayId }}-r"></table>
                </div>
            </div>
        </div>
    </li>
    {{#  }); }}
</script>

<script type="text/html" id="lightTpl">
        <img src="${ctx}/statics/imgs/{{ d.status == 10 ? 'green-alarm.png' : 'gray-alarm.png'}}" alt="">
</script>

<script src="${ctx}/statics/js/dateUtil.js?v=${v}"></script>
<script src="${ctx}/statics/js/gateway.js?v=${v}"></script>
</body>
</html>
